using System;
using Lib.Properties;

namespace DataStubGenerator.Exceptions
{
    public class SaveFailedException : ApplicationException, ILoggable
    {
        public bool ShouldDisplay
        {
            get { return _shouldDisplay; }
        }

        #region ILoggable Members

        public string Caption
        {
            get { return Resources.SaveFailed; }
        }

        #endregion

        private readonly bool _shouldDisplay;

        public SaveFailedException(bool shouldDisplay)
            : base("Invalid file type extension! Only \'.xtbl\' allowed!")
        {
            _shouldDisplay = shouldDisplay;
        }
    }
}